package theOrbalEra.common.block;

import theOrbalEra.common.util.DefultValue;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

public class BlockOrbalStreetLight extends OrbalBlockContainer {

	public BlockOrbalStreetLight(int par1, Material par3Material) {
		super(par1, par3Material);
	
		this.setLightValue(1F);
		this.setLightOpacity(3);
		//this.setBlockBounds(0, 0, 0, 3, 3, 3); 
		
	}
	
	@Override
	public boolean renderAsNormalBlock() {
	
		return false;
	}

	@Override
	@SideOnly(Side.CLIENT)
	public int getRenderBlockPass() {
	
		return 1;
	}

	@Override
	public int onBlockPlaced(World par1World, int par2, int par3, int par4,
			int par5, float par6, float par7, float par8, int par9) {
		this.setBlockBounds(-0.5F, -0.5F, -0.5F, 1.0F, 3.5F, 1.0F); 
		return super.onBlockPlaced(par1World, par2, par3, par4, par5, par6, par7, par8,
				par9);
	}

	@Override
	public void onBlockPlacedBy(World par1World, int par2, int par3, int par4,
			EntityLiving par5EntityLiving, ItemStack par6ItemStack) {
		this.setBlockBounds(-0.5F, -0.5F, -0.5F, 1.0F, 3.5F, 1.0F); 
	}

	@Override
	@SideOnly(Side.CLIENT)
	public void registerIcons(IconRegister par1IconRegister) {
		this.blockIcon=par1IconRegister.registerIcon(DefultValue.ModName+":none");
	}


	@Override
	public TileEntity createNewTileEntity(World var1) {
		
		return new TileEntityStreetLight();
	}

}
